Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use filename completer for all shell commands #12624

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atn34
Copy link

@atn34 atn34 commented Jan 21, 2025

Previously only :sh used the filename completer

I looked at the PRs that introduced the other shell commands (#1972, #2589, #4931), and didn't see any discussion about completers so I think this is just an oversight. It's possible that I missed a shell command I didn't know about so please check for that in the review.

Previously only :sh used the filename completer
@atn34
Copy link
Author

atn34 commented Jan 21, 2025

It looks like this isn't going to be all that useful after #12527, because shell commands will only have one argument for autocomplete (I think) and file completion isn't going to help you pick a command to run

@the-mikedavis
Copy link
Member

I have partially pulled this into #12527 - all shell commands use a constant for their completer and signature.

Shell command completion needs some improvements aside from #12527 though and #12527 will be (in many cases) a regression for shell command completion. Completion in general should be refactored to follow Kakoune: be a function of the current cursor position rather than argument text. That will allow some custom pasing rules for filenames that looks back and tries to find the current filename, unrelated to how the arguments are parsed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants